
option explicit

' ------------------------------------------------------------------------------
' ------------------------------------------------------------------------------
' --- Quebla - View Join Library - Version 1.0.0
' --- Autor:    Sardi, Leandro Daniel
' --- Mail:     lsardi@quebla.com.ar
' --- Fecha:    2006/06/05
' ---
' --- Copyright Quebla (c). Todos los derechos reservados
' ---


' FALTA

class CJoinHnd

    private m_oViewHnd
    private m_oFilterHnd
    private m_sType
    
    
    public property get oViewHnd()
        set oViewHnd = m_oViewHnd
    end property

    public property set oViewHnd(byval o)
        set m_oViewHnd = o
    end property


    public property get oFilterHnd()
        set oFilterHnd = m_oFilterHnd
    end property

    public property set oFilterHnd(byval o)
        set m_oFilterHnd = o
    end property


    public property get sType()
        sType = m_sType
    end property

    public property let sType(byval s)
        m_sType = s
    end property


    public function GetExpresion()
        dim sRes
        
        ' [LEFT|RIGHT]
        if m_sType <> "" then sRes = " " & m_sType

        ' JOIN Tx [<TableAlias_x>]
        sRes = sRes & " JOIN " & m_oViewHnd.sClassName
        
        if not isempty(m_oViewHnd.sAlias) and _
            not isnull(m_oViewHnd.sAlias) and _
            not m_oViewHnd.sAlias="" _
        then
            sRes = sRes & " [" & m_oViewHnd.sAlias & "]"
        end if

        ' ON <Condition_Expresion_x> =
        sRes = sRes & " ON " & m_oFilterHnd.GetExpresion()

        ' Retorno
        GetExpresion = sRes
    end function
end class


